<template>
	<view class="">
		<view class="flex flex-column pt-20">
			<view class="flex pb-20">
				<view class="mr-20">
					<u-image :src="$_BASE_IMG_API + item.itemPicture" width="150rpx" height="150rpx" borderRadius="15"></u-image>
				</view>
				<view class="flex-1 flex flex-column justify-between">
					<view class="flex justify-between">
						<text class="font-28 text-ellipsis-2">{{item.itemName}}</text>
						<view class="ml-30 mt-10">
							<text class="text-greey p-10 border rounded-10" v-if="item.num">x{{item.num}}</text>
							<text class="text-greey p-10 border rounded-10" v-else>x{{item.returnCount}}</text>
						</view>
					</view>
					<view class="flex justify-between">
						<text class="font-20 text-greey text-ellipsis" style="width: 400rpx;">规规：{{item.skuName || '默认规格'}}</text>
						<text class="font-30 font-weight-bold" v-if="item.primitivePrice">¥{{item.primitivePrice}}</text>
						<text class="font-30 font-weight-bold" v-else>¥{{item.price}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'order-detail-good-item',
		props: {
			item: {
				type: Object,
				default() {
					return {}
				}
			}
		},
		methods: {
			toDetail() {
				uni.navigateTo({
				  url:'/pages/goodsDetail/commonGoodsDetail/commonGoodsDetail?itemId='+ this.item.itemId
				})
			}
		}
	}
</script>

<style>
</style>
